-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): fix custom eslint rules with typescript 5.2 and ts-node as transpiler #20387
fix(core): fix custom eslint rules with typescript 5.2 and ts-node as transpiler #20387
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 698a8cb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 2134ee9. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 5 targets
Sent with 💌 from NxCloud. |
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
@meeroslav the CI failures are new after making this change, so I guess allowing setting the Should the e2e tests be updated, or should I revert the change and go back to the tighter check? |
Hi @mattlewis92 I'm really sorry for how long it's taken for you to get a response on this one. This area of the codebase has changed a little bit since this PR was opened and I just tried to reproduce the issue you are describing and couldn't. I created a new nx workspace (therefore using TS 5.4), added a custom lint rule, wired it up in my eslint config, and ensured it was running with I then deliberately made the lint rule fail with a bad import to make sure it wasn't a false positive. Please could you provide steps to reproduce the issue with the latest nx? |
All good, this has been fixed in the latest nx already by something else, we can close this :) |
Awesome, thank you for confirming! |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Using custom eslint rules fails when using ts-node + typescript 5.2 due to
moduleResolution
being set tonode16
for the workspace rules tsconfig, but then themodule
value is always being overridden tocommonjs
by instead of being preserved asnode16
. This worked in previous versions of typescript, but from 5.2 this becomes a hard error: microsoft/TypeScript#54567Which is then swallowed and results in all custom eslint rules failing with a message like this:
Expected Behavior
Linting with custom workspace rules works with ts-node + typescript 5.2
Related Issue(s)
N/A